/**
 * 
 */
package com.chitranshu.sample;

import android.app.ActivityGroup;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;

/**
 * @author anshu
 * 
 */
public class Activity2 extends ActivityGroup {
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		Button button = new Button(this);
		button.setText("Launch another activity");
		button.setOnClickListener(new OnClickListener() {

			@Override
			public void onClick(View v) {
				startActivity(new Intent(Activity2.this,
						SampleBottomTabActivity.class));
			}
		});

		setContentView(button);
	}

	@Override
	protected void onPause() {
		System.out.println("Activity2::onPause");
		super.onPause();
	}

	@Override
	protected void onStart() {
		System.out.println("Activity2::onStart");
		super.onStart();
	}

	@Override
	protected void onRestart() {
		System.out.println("Activity2::onRestart");
		super.onRestart();
	}

	@Override
	protected void onStop() {
		System.out.println("Activity2::onStop");
		super.onStop();
	}

	@Override
	protected void onDestroy() {
		System.out.println("Activity2::onDestroy");
		super.onDestroy();
	}
}
